<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <link rel="stylesheet" href=" __CONTROL_TPL__/login.css">
    <jquery/>
    <script>
    window.onload = function(){
        var oImg = document.getElementById('checkImg');
        oImg.onclick = function(){
            this.src = '?c=login&m=showCode&=mt'+Math.random(0,1000);
        }

    $("#bottom-box .codeTxt").focus(function(){
        $(this).val("");
    })

     $('#bottom-box .codeTxt').blur(function(){          
            var val = $(this).val();
            var url = "?c=Login&m=checkCode";
            $.ajax({
                type:'POST',
                url:url,
                data:'code='+val,
                dataType:'json',
                success:function(data){
                    if(data.status === true){
                        $('#bottom-box .codeTxt').val(data.msg).css('color','#6db049');
                        $('#bottom-box .rz').attr('value','1');
                    }else{
                        $('#bottom-box .codeTxt').val(data.msg).css('color','red');
                        $('#bottom-box .rz').attr('value','0');
                    }
                }

            })
        })


    }    
    </script>

    <title>login</title>
</head>
<body>
    <div id="login-box">
        <div id="top-box">
            <div class="title">
                <h1>色丰 · 后台管理系统</h1>
            </div>
        </div>
        <div id="bottom-box">
            <form action="?c=login&m=login" method="post">
                <p class="useName">
                    <label >用户名</label>
                    <input type="text" name="username">
                </p>
                <p class="passWd">
                    <label > 密码</label>
                    <input type="password" name="password">
                </p>
                <p class="code">
                    <img id="checkImg" src="{|U:'showCode'}" alt="">
                    <input class="codeTxt" type="text" value="请在此输入">
                    <input type="hidden" name="key" class="rz" value="">
                    <span></span>
                </p>
                <p>
                    <input class="btn" type="submit" value="登陆">
                </p>
            </form>
        </div>
    </div>
</body>
</html>